/* 
 * File:   global.h
 * Author: zhouzhao
 *
 * Created on December 21, 2011, 3:04 PM
 */

#ifndef GLOBAL_H
#define	GLOBAL_H

#include <string>
#include <vector>
#include <map>

#include <thrust/host_vector.h>
#include <thrust/device_vector.h>

#include "node.h"
#include "devNode.h"
#include "module.h"
#include "vertex.h"

#define MAXLINE 100
#define MAXCYCLE 100

using namespace std;

extern Node** nodeAll;
extern Node** nodeInput;
extern Node** nodeOutput;

extern int allCount;
extern int inputCount;
extern int outputCount;
extern int wireCount;
extern int maxLevel;

extern map<GType, string> gMap;
extern map<NType, string> nMap;
extern map<LType, string> lMap;
extern map<KWord, string> kMap;

extern thrust::host_vector<devNode>* gMatrix; //matrix used on CPU
extern thrust::host_vector<devNode>* test; //matrix used on CPU for verification
extern vector<Node*>* ptrMatrix; //matrix used on CPU for level access

extern thrust::host_vector<devNode*> stem_host; //vector used to help memory transfer between CPU and GPU
extern thrust::device_vector<devNode*> stem_device; //not used

extern vector<module*> moduleAll;
extern int* matrix; //matrix used to store input vector

extern map<int, vector<vertex> > nPartition; //map data structure for partition result

#endif	/* GLOBAL_H */
